<template>
  <el-config-provider
    namespace="hi"
    :locale="zhCn"
  >
    <router-view />
  </el-config-provider>
</template>

<script setup lang="ts">
import { onMounted, nextTick } from 'vue';

import { ElConfigProvider } from 'hive-plus';
import zhCn from 'hive-plus/dist/locale/zh-cn.mjs';
import { RouterView } from 'vue-router';

import { SessionStorageService, LocalStorageService } from '@/utils/storage';

onMounted(() => {
  // 清除storage中过期的内容
  LocalStorageService.clearExpired();
  SessionStorageService.clearExpired();

  nextTick(() => {
    const loadingDom = document.getElementById('MhLoading');
    if (loadingDom) {
      loadingDom.style.display = 'none';
      loadingDom.remove();
    }
  });
});
</script>

<style lang="scss" scoped></style>
